home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 17 / AMIGAplus Sonderheft 17 (1999)(ICP)(DE)[!].iso / Rexx / AnimCharPath.pprx < prev    next >
Text File  |  1998-01-24  |  64KB  |  2,084 lines

  1. /* Personal Paint Amiga Rexx script - Copyright © 1997 Cloanto Italia srl */
  2.  
  3. /* $VER: AnimCharPath.pprx 1.1 */
  4.  
  5. /** ENG
  6.  This script can be used to easily create animations with
  7.  moving and transforming characters (vector fonts).
  8.  
  9.  The main requester gives access to the following commands:
  10.  
  11.  - New: the path is cleared and the character settings are restored
  12.    to their default values.
  13.  
  14.  - Load: an existing path file can be selected using the file requester;
  15.    this causes the path coordinates, the brush transformation settings
  16.    and the animation settings to be loaded (note: this data
  17.    is stored in ASCII format and can easily be algorithmically
  18.    generated and manipulated by other programs).
  19.  
  20.  - Save: this command writes a path file using the current path data.
  21.  
  22.  - Define Freehand: the mouse can be used to "draw" the path;
  23.    both the direction of the path and the mouse movement speed
  24.    affect the resulting animation: the original direction
  25.    is used to render the frames (the starting point is used
  26.    to place the object in the first frame and the last point
  27.    is used for the last frame) and the drawing speed
  28.    affects the number and the "density" of stored points
  29.    (the slower the speed, the more points, and
  30.    vice versa) and defines the perceived speed of the animation
  31.    (e.g. a path defined with a high initial speed and a slow
  32.    ending speed leads to a corresponding animation).
  33.    Before the mouse button is pressed, the character is displayed
  34.    to ease positioning in the first frame. All drawing must occur
  35.    holding down the left mouse button, releasing it only at the
  36.    end of the definition.
  37.  
  38.  - Define Linear: the mouse can be used to define a linear path
  39.    (simply consisting of a starting point and an ending point);
  40.    unlike the freehand path, this kind of path produces a
  41.    constant-speed animation (equally-spaced intermediate points
  42.    are generated automatically). To define the path, press the left
  43.    mouse button on the starting point, and release it at the end.
  44.  
  45.  - Edit: this command can be used to visually edit the path;
  46.    the "path points" can be dragged with the mouse to change the
  47.    path shape and/or density (speed); the <m> key toggles
  48.    the magnify mode on or off, and the right mouse button or the <Esc> key
  49.    can be pressed to leave the editing mode.
  50.  
  51.  - Move and Resize: the mouse can be used to resize the animation
  52.    path (clicking on the lower right part of the path) or to drag it
  53.    to a new position (clicking on the upper part). This is useful
  54.    to create paths with point outside the screen, which cannot be
  55.    drawn by hand. The <m> key toggles the magnify mode on or off, and
  56.    the right mouse button or the <Esc> key can be pressed
  57.    to exit from the move and resize mode.
  58.  
  59.  - Character: the character requester can be used to select the
  60.    font to be used (the "Vector Font Path Selection" macro must be
  61.    run to select a font path other than "FONTS:"), the character,
  62.    its (initial) size, the handle position ("Base Left", "Base Center",
  63.    "Center") and the antialias level ("None", "Low", "Medium", "High").
  64.  
  65.  - Character Angle: the Character Angle requester is used to set
  66.    the number of character rotations ("Rotation Cycles"), the starting
  67.    ("From Angle") and ending angle ("To Angle"), and the
  68.    rotation direction ("Direction": "Clockwise/Counterclockwise");
  69.    a number of rotations greater than 1 can be used to add
  70.    additional 360° spins in the specified direction.
  71.  
  72.  - Character Shear: the Character Shear requester is used to set
  73.    the number of shear cycles ("Shear Cycles"), and the starting and
  74.    ending shear level ("From Angle", "To Angle"); if a number of
  75.    shear cycles greather than 1 is specified,
  76.    the shear factors will move back and forth within the specified
  77.    limits (an odd number of cycles must be used to reach the ending
  78.    shear in the last frame).
  79.  
  80.  - Character Boldness: the Character Boldness requester is used to set
  81.    the number of boldness cycles, the starting and
  82.    ending horizontal boldness level ("From Horizontal" and "To Horizontal"),
  83.    and the starting and ending vertical boldness ("From Vertical" and
  84.    "To Vertical"); if a number of cycles greather than 1
  85.    is specified, the boldness levels will move back and forth within
  86.    the specified limits (an odd number of cycles must be used to reach
  87.    the ending boldness in the last frame).
  88.  
  89.  - Character Size: the Character Size requester is used to set
  90.    the number of resize cycles ("Resize Cycles"), and the starting and
  91.    ending size ("From" and "To", in percentage of the initial size);
  92.    if a number of resize cycles greather than 1 is specified,
  93.    the resize factor will move back and forth within the specified
  94.    limits (an odd number of cycles must be used to reach the ending
  95.    size in the last frame).
  96.  
  97.  - Data: the Data requester is used to view all path information
  98.    at a glance (animation, character, rotation, shear, boldness
  99.    and resize settings, followed by the path coordinates).
  100.  
  101.  - Preview: this command is used to preview the animation (no antialiasing
  102.    is applied in preview mode).
  103.  
  104.  The main requester also contains gadgets to set the animation
  105.  frames ("Count"), the recording direction ("Direction":
  106.  "Forward/Backward/Still" - the frame step) and the frame insertion option
  107.  ("Add Frames" - if active, "Count" frames are inserted).
  108.  
  109.  When using freehand paths with no character effect, the "Count"
  110.  setting should not be set to a number greater than the path points
  111.  (as reported by the Data requester), as this would generate one or more
  112.  duplicate frames.
  113.  
  114.  The bottom gadgets in the main requester can be used to render
  115.  the animation ("Draw", which also terminates the script) or to
  116.  quit the script ("Quit"). A copy of the current path is
  117.  always temporarily stored, so that it can be used when the script is
  118.  run again.
  119. */
  120.  
  121. /** DEU
  122.  Dieses Skript ermöglicht die einfache Erzeugung von Animationen, in deren
  123.  Verlauf Schriftzeichen aus Vektorfonts bewegt und verwandelt werden.
  124.  
  125.  Im Haupt-Dialogfenster erfolgt der Zugriff auf folgende Befehle:
  126.  
  127.  - Neu: Löscht den alten Pfad und setzt die Zeicheneinstellungen auf ihre
  128.    Standardwerte zurück.
  129.  
  130.  - Laden: Mit dem Dateiauswahlfenster läßt sich eine zurvor gespeicherte
  131.    Pfaddatei auswählen. Dabei werden Pfadkoordinaten, Einstellungen für die
  132.    Pinseltransformation und verschiedene Animationseinstellungen geladen.
  133.    Hinweis: Diese Daten liegen im ASCII-Format vor und lassen sich daher auf
  134.    einfache Weise mit Hilfe anderer Programme algorithmisch erzeugen und/oder
  135.    verändern.
  136.  
  137.  - Speichern: Schreibt eine Pfaddatei unter Verwendung der aktuellen
  138.    Pfaddaten.
  139.  
  140.  - Frei festlegen: Ermöglicht die Bestimmung des Pfades mit Hilfe der Maus.
  141.    Sowohl dessen Verlauf als auch die Geschwindigkeit der Mausbewegung
  142.    beeinflussen den späteren Animationsablauf: Die ursprüngliche Richtung wird
  143.    zur Berechnung der Einzelbilder verwendet (Das erste Einzelbild wird am
  144.    Startpunkt berechnet, das letzte dementsprechend am Zielpunkt), während die
  145.    Geschwindigkeit des Zeichenvorgangs sowohl Anzahl als auch Abstand
  146.    ("Dichte") der gespeicherten Punkte beeinflußt. Dabei gilt: Je geringer die
  147.    Geschwindigkeit, desto mehr Punkte, und umgekehrt. Auch die
  148.    Ablaufgeschwindigkeit hängt von diesem Faktor ab, d. h. ein mit hoher
  149.    Anfangs- und geringer Endgeschwindigkeit definierter Pfad erzeugt eine
  150.    dementsprechend mit zunehmend geringerer Geschwindigkeit ablaufende
  151.    Animation. Um die Festlegung der Position für das erste Einzelbild zu
  152.    erleichtern, wird vor der Betätigung der linken Maustaste das aktuelle
  153.    Zeichen angezeigt.
  154.  
  155.  - Linear festlegen: Ermöglicht die Bestimmung eines linearen Pfades,
  156.    welcher lediglich durch Anfangs- und Endpunkt festgelegt wird. Im Gegensatz
  157.    zum frei festgelegten Pfad wird hierdurch eine Animation erzeugt, die über
  158.    ihren gesamten Verlauf hinweg eine konstante Geschwindigkeit beibehält, da
  159.    die Zwischenpunkte automatisch alle im gleichen Abstand voneinander
  160.    angeordnet werden.
  161.  
  162.  - Bearbeiten: Dient zur visuellen Bearbeitung des Pfades. Durch Verschieben
  163.    der einzelnen Knotenpunkte des Pfades mit der Maus lassen sich Form und
  164.    Dichte (Geschwindigkeit) ändern. Mit Hilfe der Taste <m> läßt sich die
  165.    Lupenfunktion an- oder ausschalten. Um den Bearbeitungsmodus zu verlassen,
  166.    ist die <Esc>-Taste zu drücken.
  167.  
  168.  - Position und Größe: Hiermit lassen sich unter Verwendung der Maus
  169.    Position (durch Anklicken des rechten unteren Pfadteils) und Größe (durch
  170.    Anklicken des oberen Teils) des Animationspfades ändern. Dies eignet sich
  171.    besonders zur Erzeugung von Animationspfaden, die aus dem sichtbaren Bereich
  172.    hinauslaufen, da sich diese nicht von Hand zeichnen lassen. Mit <m> läßt
  173.    sich jederzeit die Lupe an- oder ausschalten, und mit <Esc> wird der Modus
  174.    "Position und Größe" verlassen.
  175.  
  176.  - Zeichen: In diesem Zeichenauswahl-Dialogfenster werden der gewünschte
  177.    Font, das Zeichen, dessen Anfangsgröße, die Griffpunktposition "Basis
  178.    Links", "Basis Mitte", "Mitte" und der Grad der Kantenglättung "Keine",
  179.    "Gering", "Mittel", "Hoch") eingestellt. Hinweis: Um einen anderen Fontpfad
  180.    als "FONTS:" zu wählen, muß zuvor das Makro "Vektorfont-Pfadauswahl"
  181.    ausgeführt werden.
  182.  
  183.  - Zeichen drehen: In diesem Dialogfenster werden die Anzahl der Umdrehungen
  184.    ("Umdrehungen"), der Startwinkel ("Startwinkel"), der Zielwinkel
  185.    ("Zielwinkel") und der Drehsinn ("Drehsinn "Rechts herum/Links herum"
  186.    festgelegt; durch die Angabe eines Wertes > 1 lassen sich zusätzliche volle
  187.    Umdrehungen erzeugen.
  188.  
  189.  - Zeichen kippen: In diesem Dialogfenster werden die Anzahl der
  190.    Kippdurchläufe ("Durchläufe") und der Anfangs- und Endwinkel des
  191.    Kippvorgangs ("Von Winkel", "Bis Winkel") festgelegt; durch die Angabe eines
  192.    Kipp-Wertes > 1 pendeln die Kippwerte zwischen den angegebenen Grenzwerten
  193.    hin und her. Hinweis: Um den Kipp-Endwert beim letzten Einzelbild zu
  194.    erreichen, muß eine gerade Anzahl von Durchläufen angegeben werden.
  195.  
  196.  - Zeichendicke: In diesem Dialogfenster werden die Anzahl der Durchläufe,
  197.    der Start- und Endwert für die horizontale Zeichendicke ("Von Horizontal"
  198.    und "Bis Horizontal") und der Start- und Endwert für die vertikale
  199.    Zeichendicke ("Von Vertikal") und ("Bis Vertikal") festgelegt. Wenn mehr als
  200.    ein Durchlauf festgelegt wird, pendeln die Dickewerte zwischen den beiden
  201.    Grenzwerten hin und her. Hinweis: Um den Dicke-Endwert beim letzten
  202.    Einzelbild zu erreichen, muß eine gerade Anzahl von Durchläufen angegeben
  203.    werden.
  204.  
  205.  - Zeichengröße: Dieses Dialogfenster dient zum Einstellen der
  206.    Änderungsdurchläufe für die Zeichengröße ("Durchläufe"), der Start- und
  207.    Zielgröße ("Von" und "Bis" in Prozent der ursprünglichen Größe); wenn mehr
  208.    als ein Durchlauf festgelegt wird, pendelt der Wert für für die
  209.    Größenänderung zwischen den angegebenen Grenzwerten hin und her. Hinweis: Um
  210.    den Endwert beim letzten Einzelbild zu erreichen, muß eine gerade Anzahl von
  211.    Durchläufen angegeben werden.
  212.  
  213.  - Im Daten-Dialogfenster werden alle Pfadinformationen auf einen Blick
  214.    dargestellt: Animation, Zeichen, Umdrehung, Kippwerte, Dicke,
  215.    Größeneinstellungen und Pfadkoordinaten.
  216.  
  217.  - Vorschau: Mit diesem Befehl läßt sich eine Vorschau der Animation
  218.    betrachten. Im Vorschaumodus wird keine Kantenglättung angewendet.
  219.  
  220.  - Das Haupt-Dialogfenster enthält daneben auch Funktionen zum Festlegen der
  221.    Einzelbilder einer Animation ("Zähler"), der Aufzeichnungsrichtung
  222.    ("Richtung": "Vorwärts/Rückwärts/Stillstand" - die Schrittweite) und zum
  223.    Einfügen von Einzelbildern ("Bilder add." - wenn aktiviert, werden unter
  224.    "Zähler" Bilder hinzugefügt).
  225.  
  226.  Bei der Verwendung eines frei festgelegten Pfades ohne einen Pinseleffekt
  227.  sollte der "Zähler"-Wert die Anzahl der Knotenpunkte des Pfades (wie im
  228.  Daten-Dialogfenster angezeigt) nicht überschreiten, da dies zur Duplizierung
  229.  eines oder mehrerer Einzelbilder führen würde.
  230.  
  231.  Die unteren Funktionselemente im Haupt-Dialogfenster dienen zum Erzeugen der
  232.  Animation ("Zeichnen", dient auch zum Abbrechen des Skripts) und zum Beenden
  233.  des Skripts ("Verlassen"). Es wird immer eine temporäre Kopie des aktuellen
  234.  Pfades gespeichert, die bei einem erneuten Start des aktuellen Skripts
  235.  geladen wird.
  236.  
  237. */
  238.  
  239. /** ITA
  240.  Si può usare questo script per creare facilmente animazioni con caratteri
  241.  che si muovono e trasformano (font vettoriali).
  242.  
  243.  La finestra di dialogo principale mette a disposizione i seguenti comandi:
  244.  
  245.  - Nuovo: il percorso è cancellato e le impostazioni del carattere
  246.    sono riportate ai loro valori predefiniti.
  247.  
  248.  - Leggere: si può scegliere un file di percorso già esistente tramite la
  249.    finestra di scelta file; ciò comporta il caricamento delle coordinate del
  250.    percorso, delle impostazioni di trasformazione del pennello e di quelle
  251.    relative all'animazione (nota: tali dati sono immagazzinati in formato
  252.    ASCII e possono essere facilmente generati tramite algoritmi nonché
  253.    manipolati da altri programmi).
  254.  
  255.  - Scrivere: Questo comando salva un file di percorso usando i dato del percorso
  256.    corrente.
  257.  
  258.  - Definire a mano libera: si può usare il mouse per "tracciare" il percorso;
  259.    l'animazione risultante è influenzata sia dalla direzione del percorso sia
  260.    dalla velocità di spostamento del mouse: la direzione originale è usata
  261.    per disegnare i fotogrammi (il punto di partenza è utilizzato per piazzare
  262.    l'oggetto nel primo fotogramma e l'ultimo punto è usato per il fotogramma
  263.    finale) mentre la velocità del tracciamento influenza il numero e la
  264.    "densità" dei punti memorizzati (tanto è più lenta la velocità, tanto
  265.    maggiore il numero dei punti, e viceversa) e definisce la velocità
  266.    percepita dell'animazione (es. un percorso definito con una alta velocità
  267.    iniziale ed una bassa velocità finale porta ad una animazione con
  268.    caratteristiche corrispondenti). Per facilitare il posizionamento del
  269.    primo fotogramma, prima che sia premuto il pulsante del mouse viene
  270.    visualizzato il carattere. Il pulsante del mouse va rilasciato solo a
  271.    percorso completato.
  272.  
  273.  - Definire lineare: si può usare il mouse per definire un percorso lineare
  274.    (che consiste semplicemente di un punto di partenza e uno d'arrivo);
  275.    a differenza del percorso a mano libera, questo tipo di percorso produce
  276.    una animazione a velocità costante (i punti intermedi sono generati in modo
  277.    automatico a distanze tra loro eguali). Per definire il percorso,
  278.    premere il pulsante sinistro del mouse all'inizio del percorso, e
  279.    rilasciarlo alla fine.
  280.  
  281.  - Modificare: si può usare questo comando per modificare in modo
  282.    visivo il percorso; i "punti del percorso" possono essere spostati col
  283.    mouse per cambiare la forma del percorso e/o la densità (velocità); il
  284.    tasto <m> attiva/disattiva l'ingrandimento, ed il tasto destro del mouse
  285.    o il tasto <Esc> possono essere premuti per uscire dalla modalità di
  286.    modifica percorso.
  287.  
  288.  - Spostare e ridimensionare: si può usare il mouse per ridimensionare il
  289.    percorso dell'animazione (facendo click sulla parte inferiore destra dello
  290.    stesso) o spostarlo in una nuova posizione (facendo click sulla parte
  291.    superiore). Ciò è utile per creare percorsi con punti all'esterno dello
  292.    schermo, che non si possono piazzare manualmente. Il tasto <m>
  293.    attiva/disattiva l'ingrandimento, ed il tasto destro del mouse o il tasto
  294.    <Esc> possono essere premuti per uscire dalla modalità di spostamento e
  295.    ridimensionamento.
  296.  
  297.  - Carattere: si può usare la finestra di selezione caratteri per scegliere
  298.    il font da usare (si deve lanciare la macro "VectorFontPath.pprx"
  299.    per scegliere un percorso font diverso da "FONTS:"), il carattere,
  300.    il suo (iniziale) corpo, la posizione della maniglia di ridimensionamento
  301.    ("Base sinistra", "Base centro", "Centro") e il livello di smorzamento
  302.    seghettature - o antialias ("Nessuno", "Basso", "Medio", "Alto").
  303.  
  304.  - Angolo carattere: si usa la finestra di dialogo Angolo carattere
  305.    per impostare il numero di rotazioni del carattere ("Cicli rotazione"),
  306.    l'angolo iniziale ("Da angolo") e finale ("Ad angolo"), e la direzione
  307.    della rotazione ("Senso": "Orario/Antiorario"); si può usare un numero di
  308.    rotazioni maggiore di 1 per aggiungere ulteriori avvitamenti a 360° nella
  309.    direzione specificata.
  310.  
  311.  - Inclinazione carattere: si usa la finestra di dialogo Inclinazione carattere
  312.    per impostare il numero di cicli di inclinazione ("Cicli inclinazione"), e
  313.    il livello di inclinazione iniziale e finale ("Da angolo", "Ad angolo");
  314.    se si specifica un numero di cicli di inclinazione maggiore di 1, i fattori
  315.    di inclinazione si muoveranno avanti ed indietro entro i limiti specificati
  316.    (si deve usare un numero dispari di cicli per raggiungere l'inclinazione
  317.    finale nell'ultimo fotogramma).
  318.  
  319.  - Spessore carattere: si usa la finestra di dialogo Spessore carattere per
  320.    impostare il numero di cicli di spessore, il livello iniziale e finale di
  321.    spessore orizzontale ("Da orizzontale" e "A orizzontale"), lo spessore
  322.    verticale iniziale e finale ("Da verticale" e "A verticale"); se si
  323.    specifica un numero di cicli maggiore di 1, i livelli di spessore si
  324.    muoveranno avanti ed indietro entro i limiti specificati (si deve usare un
  325.    numero dispari di cicli per raggiungerelo spessore finale nell'ultimo
  326.    fotogramma).
  327.  
  328.  - Dimensioni carattere: si usa la finestra di dialogo Dimensioni carattere per
  329.    impostare il numero di cicli di ridimensionamento ("Cicli
  330.    ridimensionamento"), e la dimensione iniziale e finale ("Da" e "A", in
  331.    percentuale della dimensione iniziale); se si specifica un numero di cicli
  332.    di ridimensionamento maggiore di 1, il fattore di ridimensionamento si
  333.    muoverà avanti ed indietro entro i limiti specificati (si deve usare un
  334.    numero dispari di cicli per raggiungere la dimensione finale nell'ultimo
  335.    fotogramma).
  336.  
  337.  - Dati: si usa la finestra di dialogo Dati percorso per vedere tutte
  338.    le informazioni relative al percorso con un solo colpo d'occhio
  339.    (impostazioni per animazione, carattere, rotazione, inclinazione, spessore,
  340.    ridimensionamento, seguite dalle coordinate del percorso).
  341.  
  342.  - Anteprima: si usa questo comando per vedere una anteprima dell'animazione
  343.    (nella modalità di anteprima non è attivato lo smorzamento seghettature).
  344.  
  345.  La finestra principale contiene anche pulsanti per impostare il numero di
  346.  fotogrammi dell'animazione ("Passi"), la direzione di registrazione
  347.  ("Direzione": "Avanti/Indietro/Fermo" - il passo fotogramma) e l'opzione per
  348.  l'inserimento di fotogrammi ("Aggiunta fotogrammi" - se è attiva, saranno
  349.  inseriti tanti fotogrammi quanti indicato da "Passi").
  350.  
  351.  Quando si usano percorsi a mano libera senza effetti sul carattere, il numero
  352.  specificato in "Passi" non dovrebbe essere maggiore del numero di punti del
  353.  percorso (come riferito dalla finestra di dialogo Dati percorso), perché in
  354.  questo modo si otterrebbero uno o più fotogrammi doppi.
  355.  
  356.  Si possono usare i pulsanti sulla parte inferiore della finestra di dialogo
  357.  principale per realizzare l'animazione ("Animare", che inoltre fa terminare
  358.  lo script) o per uscire dallo script ("Uscire"). Una copia del percorso
  359.  corrente è sempre immagazzinata temporaneamente, perché sia possibile usarla
  360.  quando si avvia nuovamente lo script.
  361. */
  362.  
  363. IF ARG(1, EXISTS) THEN
  364.     PARSE ARG PPPORT
  365. ELSE
  366.     PPPORT = 'PPAINT'
  367.  
  368. IF ~SHOW('P', PPPORT) THEN DO
  369.     IF EXISTS('PPaint:PPaint') THEN DO
  370.         ADDRESS COMMAND 'Run >NIL: PPaint:PPaint'
  371.         DO 30 WHILE ~SHOW('P',PPPORT)
  372.              ADDRESS COMMAND 'Wait >NIL: 1 SEC'
  373.         END
  374.     END
  375.     ELSE DO
  376.         SAY "Personal Paint could not be loaded."
  377.         EXIT 10
  378.     END
  379. END
  380.  
  381. IF ~SHOW('P', PPPORT) THEN DO
  382.     SAY 'Personal Paint Rexx port could not be opened'
  383.     EXIT 10
  384. END
  385.  
  386. ADDRESS VALUE PPPORT
  387. OPTIONS RESULTS
  388. OPTIONS FAILAT 10000
  389.  
  390. Get 'LANG'
  391. IF RESULT = 1 THEN DO        /* Deutsch */
  392.         global.txt_title_menu  = 'AnimZeichen-Pfad'
  393.         global.txt_title_new   = 'Neuer Animationspfad'
  394.         global.txt_title_load  = 'Animationspfad laden'
  395.         global.txt_title_save  = 'Animationspfad speichern'
  396.         global.txt_title_fhand = 'Pfad frei festlegen'
  397.         global.txt_title_line  = 'Pfad linear festlegen'
  398.         global.txt_title_edit  = 'Animationspfad bearbeiten'
  399.         global.txt_title_movrs = 'Pfadposition/Größe ändern'
  400.         global.txt_title_char  = 'Zeichen'
  401.         global.txt_title_crot  = 'Zeichen drehenl'
  402.         global.txt_title_cshr  = 'Zeichen kippen'
  403.         global.txt_title_cbold = 'Zeichendicke'
  404.         global.txt_title_cresz = 'Zeichengröße'
  405.         global.txt_title_pview = 'Pfadvorschau'
  406.         global.txt_title_draw  = 'Animation zeichnen'
  407.         global.txt_title_data  = 'Pfadinformationen'
  408.  
  409.         global.txt_menu_new    = 'Neu'
  410.         global.txt_menu_load   = 'Laden...'
  411.         global.txt_menu_save   = 'Speichern...'
  412.         global.txt_menu_fhand  = 'Frei festlegen'
  413.         global.txt_menu_line   = 'Linear festlegen'
  414.         global.txt_menu_edit   = 'Bearbeiten'
  415.         global.txt_menu_movrs  = 'Position/Größe'
  416.         global.txt_menu_char   = 'Zeichen...'
  417.         global.txt_menu_crot   = 'Zeichen drehen...'
  418.         global.txt_menu_cshr   = 'Zeichen kippen...'
  419.         global.txt_menu_cbold  = 'Zeichendicke...'
  420.         global.txt_menu_cresz  = 'Zeichengröße...'
  421.         global.txt_menu_data   = 'Informationen...'
  422.         global.txt_menu_prview = 'Vorschau'
  423.  
  424.         global.txt_gad_count   = 'Z_ähler:'
  425.         global.txt_gad_add     = '_Frames add.:'
  426.         global.txt_gad_noyes.0 = 'Nein'
  427.         global.txt_gad_noyes.1 = 'Ja'
  428.         global.txt_gad_direct  = '_Richtung:'
  429.         global.txt_gad_dirct.0 = 'Vorwärts'
  430.         global.txt_gad_dirct.1 = 'Rückwärts'
  431.         global.txt_gad_dirct.2 = 'Stillstand'
  432.         global.txt_gad_draw    = '_Zeichnen'
  433.         global.txt_gad_quit    = '_Verlassen'
  434.         global.txt_gad_font    = '_Font:'
  435.         global.txt_gad_char    = 'Zeiche_n:'
  436.         global.txt_gad_size    = '_Größe:'
  437.         global.txt_gad_handle  = 'G_riffpunkt:'
  438.         global.txt_gad_aalias  = '_Kantenglättung:'
  439.         global.txt_gad_aals.0  = 'Keine'
  440.         global.txt_gad_aals.1  = 'Gering'
  441.         global.txt_gad_aals.2  = 'Mittel'
  442.         global.txt_gad_aals.3  = 'Hoch'
  443.         global.txt_gad_handl.0 = 'Basis links'
  444.         global.txt_gad_handl.1 = 'Basis Mitte'
  445.         global.txt_gad_handl.2 = 'Mitte'
  446.         global.txt_gad_rotats  = '_Umdrehungen:'
  447.         global.txt_gad_fromang = '_Startwinkel:'
  448.         global.txt_gad_toang   = '_Zielwinkel:'
  449.         global.txt_gad_rotdir  = '_Richtung:'
  450.         global.txt_gad_rotdr.0 = 'Rechts herum'
  451.         global.txt_gad_rotdr.1 = 'Links herum'
  452.         global.txt_gad_shears  = '_Durchläufe:'
  453.         global.txt_gad_fromsh  = '_Von Winkel:'
  454.         global.txt_gad_tosh    = '_Bis Winkel:'
  455.         global.txt_gad_resizes = '_Durchläufe:'
  456.         global.txt_gad_fromrs  = '_Von (%):'
  457.         global.txt_gad_tors    = '_Bis (%):'
  458.         global.txt_gad_bolds   = '_Durchläufe:'
  459.         global.txt_gad_frombdx = '_Von Horizontal:'
  460.         global.txt_gad_tobdx   = '_Bis Horizontal:'
  461.         global.txt_gad_frombdy = 'V_on Vertikal:'
  462.         global.txt_gad_tobdy   = 'B_is Vertikal:'
  463.         global.txt_msg_points  = 'Punkte:'
  464.         global.txt_msg_ptype.0 = '(Freier Pfad)'
  465.         global.txt_msg_ptype.1 = '(Linearer Pfad)'
  466.  
  467.         global.txt_err_oldcl   = 'Dieses Skript erfordert eine neuere_Version von Personal Paint'
  468.         global.txt_err_lost    = 'Pfaddaten gehen verloren'
  469.         global.txt_err_load    = 'Pfaddatei kann nicht geöffnet werden'
  470.         global.txt_err_nopath  = 'Keine Pfaddefinition vorhanden'
  471.         global.txt_err_save    = 'Pfad kann nicht gespeichert werden'
  472.         global.txt_err_notbsh  = 'Zu wenig Platz für tempörären Pinsel'
  473.         global.txt_err_nofonts = 'Vektorschriften nicht auffindbar'
  474.         global.txt_err_rend    = 'Fehler bei der Zeichenerzeugung'
  475. END
  476. ELSE IF RESULT = 2 THEN DO        /* Italiano */
  477.     global.txt_title_menu  = 'Percorso AnimCharacter'
  478.     global.txt_title_new   = 'Nuovo percorso AnimCharacter'
  479.     global.txt_title_load  = 'Leggere percorso AnimCharacter'
  480.     global.txt_title_save  = 'Scrivere percorso AnimCharacter'
  481.     global.txt_title_fhand = 'Definire a mano libera'
  482.     global.txt_title_line  = 'Definire lineare'
  483.     global.txt_title_edit  = 'Modificare percorso AnimCharacter'
  484.     global.txt_title_movrs = 'Spostare percorso AnimCharacter'
  485.     global.txt_title_char  = 'Carattere'
  486.     global.txt_title_crot  = 'Angolo carattere'
  487.     global.txt_title_cshr  = 'Inclinazione carattere'
  488.     global.txt_title_cbold = 'Spessore carattere'
  489.     global.txt_title_cresz = 'Dimensione carattere'
  490.     global.txt_title_pview = 'Anteprima animazione'
  491.     global.txt_title_draw  = 'Creare animazione'
  492.     global.txt_title_data  = 'Dati percorso animazione'
  493.  
  494.     global.txt_menu_new    = 'Nuovo'
  495.     global.txt_menu_load   = 'Leggere...'
  496.     global.txt_menu_save   = 'Scrivere...'
  497.     global.txt_menu_fhand  = 'Definire a mano libera'
  498.     global.txt_menu_line   = 'Definire lineare'
  499.     global.txt_menu_edit   = 'Modificare'
  500.     global.txt_menu_movrs  = 'Spostare e ridimensionare'
  501.     global.txt_menu_char   = 'Carattere...'
  502.     global.txt_menu_crot   = 'Angolo carattere...'
  503.     global.txt_menu_cshr   = 'Inclinazione carattere...'
  504.     global.txt_menu_cbold  = 'Spessore carattere...'
  505.     global.txt_menu_cresz  = 'Dimensione carattere...'
  506.     global.txt_menu_data   = 'Dati...'
  507.     global.txt_menu_prview = 'Anteprima'
  508.  
  509.     global.txt_gad_count   = 'Pa_ssi:'
  510.     global.txt_gad_add     = 'Aggiunta _fotogrammi:'
  511.     global.txt_gad_noyes.0 = 'No'
  512.     global.txt_gad_noyes.1 = 'Sì'
  513.     global.txt_gad_direct  = 'Direzi_one:'
  514.     global.txt_gad_dirct.0 = 'Avanti'
  515.     global.txt_gad_dirct.1 = 'Indietro'
  516.     global.txt_gad_dirct.2 = 'Fermo'
  517.     global.txt_gad_draw    = '_Animare'
  518.     global.txt_gad_quit    = '_Uscire'
  519.     global.txt_gad_font    = '_Font:'
  520.     global.txt_gad_char    = '_Carattere:'
  521.     global.txt_gad_size    = '_Dimensione:'
  522.     global.txt_gad_handle  = '_Impugnatura:'
  523.     global.txt_gad_aalias  = 'An_tialias:'
  524.     global.txt_gad_aals.0  = 'Nessuno'
  525.     global.txt_gad_aals.1  = 'Basso'
  526.     global.txt_gad_aals.2  = 'Medio'
  527.     global.txt_gad_aals.3  = 'Alto'
  528.     global.txt_gad_handl.0 = 'Base sinistra'
  529.     global.txt_gad_handl.1 = 'Base centro'
  530.     global.txt_gad_handl.2 = 'Centro'
  531.     global.txt_gad_rotats  = 'Cicli _rotazione:'
  532.     global.txt_gad_fromang = '_Da angolo:'
  533.     global.txt_gad_toang   = 'Ad a_ngolo:'
  534.     global.txt_gad_rotdir  = '_Senso:'
  535.     global.txt_gad_rotdr.0 = 'Orario'
  536.     global.txt_gad_rotdr.1 = 'Antiorario'
  537.     global.txt_gad_shears  = 'Cicli _inclinazione:'
  538.     global.txt_gad_fromsh  = '_Da angolo:'
  539.     global.txt_gad_tosh    = 'Ad a_ngolo:'
  540.     global.txt_gad_resizes = 'Cicli _ridimensionamento:'
  541.     global.txt_gad_fromrs  = '_Da (%):'
  542.     global.txt_gad_tors    = 'A (_%):'
  543.     global.txt_gad_bolds   = 'Cicli _spessore:'
  544.     global.txt_gad_frombdx = '_Da orizzontale:'
  545.     global.txt_gad_tobdx   = 'A ori_zzontale:'
  546.     global.txt_gad_frombdy = 'Da _verticale:'
  547.     global.txt_gad_tobdy   = 'A ver_ticale:'
  548.     global.txt_msg_points  = 'Punti:'
  549.     global.txt_msg_ptype.0 = '(percorso a mano libera)'
  550.     global.txt_msg_ptype.1 = '(percorso lineare)'
  551.  
  552.     global.txt_err_oldcl   = 'Questa procedura richiede_una versione più recente_di Personal Paint'
  553.     global.txt_err_lost    = 'Il percorso sarà cancellato'
  554.     global.txt_err_load    = 'Il file non può essere aperto'
  555.     global.txt_err_nopath  = 'Non è stato definito alcun percorso'
  556.     global.txt_err_save    = 'Il percorso non può essere scritto'
  557.     global.txt_err_notbsh  = 'Non vi è spazio per il pennello temporaneo'
  558.     global.txt_err_nofonts = 'Non vi sono font vettoriali'
  559.     global.txt_err_rend    = 'Errore nella creazione del carattere'
  560. END
  561. ELSE DO                /* English */
  562.     global.txt_title_menu  = 'AnimCharacter Path'
  563.     global.txt_title_new   = 'New AnimCharacter Path'
  564.     global.txt_title_load  = 'Load AnimCharacter Path'
  565.     global.txt_title_save  = 'Save AnimCharacter Path'
  566.     global.txt_title_fhand = 'Define Freehand Path'
  567.     global.txt_title_line  = 'Define Linear Path'
  568.     global.txt_title_edit  = 'Edit AnimCharacter Path'
  569.     global.txt_title_movrs = 'Move/Resize AnimCharacter Path'
  570.     global.txt_title_char  = 'Character'
  571.     global.txt_title_crot  = 'Character Angle'
  572.     global.txt_title_cshr  = 'Character Shear'
  573.     global.txt_title_cbold = 'Character Boldness'
  574.     global.txt_title_cresz = 'Character Size'
  575.     global.txt_title_pview = 'Preview Path'
  576.     global.txt_title_draw  = 'Draw Animation'
  577.     global.txt_title_data  = 'AnimCharacter Path Data'
  578.  
  579.     global.txt_menu_new    = 'New'
  580.     global.txt_menu_load   = 'Load...'
  581.     global.txt_menu_save   = 'Save...'
  582.     global.txt_menu_fhand  = 'Define Freehand'
  583.     global.txt_menu_line   = 'Define Linear'
  584.     global.txt_menu_edit   = 'Edit'
  585.     global.txt_menu_movrs  = 'Move and Resize'
  586.     global.txt_menu_char   = 'Character...'
  587.     global.txt_menu_crot   = 'Character Angle...'
  588.     global.txt_menu_cshr   = 'Character Shear...'
  589.     global.txt_menu_cbold  = 'Character Boldness...'
  590.     global.txt_menu_cresz  = 'Character Size...'
  591.     global.txt_menu_data   = 'Data...'
  592.     global.txt_menu_prview = 'Preview'
  593.  
  594.     global.txt_gad_count   = 'C_ount:'
  595.     global.txt_gad_add     = 'Add _Frames:'
  596.     global.txt_gad_noyes.0 = 'No'
  597.     global.txt_gad_noyes.1 = 'Yes'
  598.     global.txt_gad_direct  = 'Directi_on:'
  599.     global.txt_gad_dirct.0 = 'Forward'
  600.     global.txt_gad_dirct.1 = 'Backward'
  601.     global.txt_gad_dirct.2 = 'Still'
  602.     global.txt_gad_draw    = '_Draw'
  603.     global.txt_gad_quit    = '_Quit'
  604.     global.txt_gad_font    = '_Font:'
  605.     global.txt_gad_char    = 'Ch_aracter:'
  606.     global.txt_gad_size    = '_Size:'
  607.     global.txt_gad_handle  = '_Handle:'
  608.     global.txt_gad_aalias  = 'An_tialias:'
  609.     global.txt_gad_aals.0  = 'None'
  610.     global.txt_gad_aals.1  = 'Low'
  611.     global.txt_gad_aals.2  = 'Medium'
  612.     global.txt_gad_aals.3  = 'High'
  613.     global.txt_gad_handl.0 = 'Base Left'
  614.     global.txt_gad_handl.1 = 'Base Center'
  615.     global.txt_gad_handl.2 = 'Center'
  616.     global.txt_gad_rotats  = '_Rotation Cycles:'
  617.     global.txt_gad_fromang = '_From Angle:'
  618.     global.txt_gad_toang   = '_To Angle:'
  619.     global.txt_gad_rotdir  = '_Direction:'
  620.     global.txt_gad_rotdr.0 = 'Clockwise'
  621.     global.txt_gad_rotdr.1 = 'Counterclockwise'
  622.     global.txt_gad_shears  = '_Shear Cycles:'
  623.     global.txt_gad_fromsh  = '_From Angle:'
  624.     global.txt_gad_tosh    = '_To Angle:'
  625.     global.txt_gad_resizes = 'Re_size Cycles:'
  626.     global.txt_gad_fromrs  = '_From (%):'
  627.     global.txt_gad_tors    = '_To (%):'
  628.     global.txt_gad_bolds   = '_Boldness Cycles:'
  629.     global.txt_gad_frombdx = '_From Horizontal:'
  630.     global.txt_gad_tobdx   = '_To Horizontal:'
  631.     global.txt_gad_frombdy = 'F_rom Vertical:'
  632.     global.txt_gad_tobdy   = 'T_o Vertical:'
  633.     global.txt_msg_points  = 'Points:'
  634.     global.txt_msg_ptype.0 = '(freehand path)'
  635.     global.txt_msg_ptype.1 = '(linear path)'
  636.  
  637.     global.txt_err_oldcl   = 'This script requires a newer_version of Personal Paint'
  638.     global.txt_err_lost    = 'The path will be lost'
  639.     global.txt_err_load    = 'The path file cannot be opened'
  640.     global.txt_err_nopath  = 'No path has been defined'
  641.     global.txt_err_save    = 'The path cannot be saved'
  642.     global.txt_err_notbsh  = 'No space for temporary brush'
  643.     global.txt_err_nofonts = 'Vector fonts not found'
  644.     global.txt_err_rend    = 'Character rendering error'
  645. END
  646.  
  647. Version 'REXX'
  648. IF RESULT < 7 THEN DO
  649.     RequestNotify 'PROMPT "'global.txt_err_oldcl'"'
  650.     EXIT 10
  651. END
  652.  
  653. tmpname = 'T:PP_AnimCharPath'
  654.  
  655. global.fontnum = 0
  656. global.pathdisp = 1
  657.  
  658. CALL DefData
  659.  
  660. LockGUI
  661.  
  662. GetPaintMode
  663. global.savepmode = RESULT
  664.  
  665. GetBrushAttributes 'WIDTH'
  666. global.bshw = RESULT
  667. GetBrushAttributes 'HEIGHT'
  668. global.bshh = RESULT
  669. GetBrushAttributes 'HANDLEX'
  670. global.bshhx = RESULT
  671. GetBrushAttributes 'HANDLEY'
  672. global.bshhy = RESULT
  673.  
  674. GetBrushAttributes 'FRAMES'
  675. global.savebshfr = RESULT
  676. GetBrushAttributes 'FRAMEPOSITION'
  677. global.savebshfp = RESULT
  678. GetBrushNumber
  679. global.savebshnum = RESULT
  680. GetCurrentBrush
  681. global.savebsh = RESULT
  682.  
  683. SetCurrentBrush 'UNUSED'
  684. IF RC ~= 0 THEN DO
  685.     RequestNotify 'TITLE "'global.txt_title_menu'" PROMPT "'global.txt_err_notbsh'"'
  686.     UnlockGUI
  687.     EXIT 0
  688. END
  689. GetBrushNumber
  690. global.tbshnum = RESULT
  691.  
  692. SetCurrentBrush 'RECTANGULAR WIDTH 1 HEIGHT 1'
  693.  
  694. GetPen 'FOREGROUND'
  695. global.savepen = RESULT
  696. Get 'COLORS'
  697. global.xorpen = RESULT-1
  698. SetPen 'FOREGROUND' global.xorpen
  699.  
  700. Get 'BARS'
  701. savebars = RESULT
  702. Set '"BARS=0"'
  703.  
  704. Get 'GCLIP'
  705. saveclip = RESULT
  706. Set '"GCLIP=0"'
  707.  
  708. Get 'COORD'
  709. savecoord = RESULT
  710. Set '"COORD=0"'
  711.  
  712. DisableTools
  713. UnlockGUI
  714.  
  715. SIGNAL ON Break_C
  716.  
  717. /* load last used path and display it */
  718. CALL LoadPathFile(tmpname)
  719. CALL XorPath
  720.  
  721. Get 'SCREENH'
  722. IF RESULT < 225 THEN
  723.     mrows = 11
  724. ELSE
  725.     mrows = 14
  726.  
  727. command = 0
  728. DO FOREVER
  729.     Request '"'global.txt_title_menu'" COMPACT ',
  730.             '"LIST ACTION = , 14, 'command', 20, 'mrows', ',
  731.             ' ""'global.txt_menu_new'"", ',
  732.             ' ""'global.txt_menu_load'"", ',
  733.             ' ""'global.txt_menu_save'"", ',
  734.             ' ""'global.txt_menu_fhand'"", ',
  735.             ' ""'global.txt_menu_line'"", ',
  736.             ' ""'global.txt_menu_edit'"", ',
  737.             ' ""'global.txt_menu_movrs'"", ',
  738.             ' ""'global.txt_menu_char'"", ',
  739.             ' ""'global.txt_menu_crot'"", ',
  740.             ' ""'global.txt_menu_cshr'"", ',
  741.             ' ""'global.txt_menu_cbold'"", ',
  742.             ' ""'global.txt_menu_cresz'"", ',
  743.             ' ""'global.txt_menu_data'"", ',
  744.             ' ""'global.txt_menu_prview'"" ',
  745.             ' VSPACE = 4 ',
  746.             ' INTSTR = ""'global.txt_gad_count'"", 1, 32000, 'global.count' ',
  747.             ' VSPACE = 2 ',
  748.             ' CYCLE = ""'global.txt_gad_direct'"", 3, 'global.direct', ""'global.txt_gad_dirct.0'"", ""'global.txt_gad_dirct.1'"", ""'global.txt_gad_dirct.2'"" ' ||,
  749.             ' VSPACE = 2 ',
  750.             ' CHECK = ""'global.txt_gad_add'"", 'global.add' ' ||,
  751.             ' VSPACE = 2 ',
  752.             ' ACTION = ""'global.txt_gad_draw'"" ',
  753.             ' ACTION = ""'global.txt_gad_quit'"" "'
  754.     IF RC = 0 THEN DO
  755.         command = RESULT.1
  756.         global.count = RESULT.2
  757.         global.direct = RESULT.3
  758.         global.add = RESULT.4
  759.  
  760.         IF RESULT = 1 THEN DO    /* Draw */
  761.             IF DrawIt() THEN
  762.                 LEAVE
  763.         END
  764.         ELSE IF RESULT = 2 THEN    /* Quit */
  765.             LEAVE
  766.         ELSE DO     /* Command List */
  767.             IF      command = 0 THEN CALL NewPath
  768.             ELSE IF command = 1 THEN CALL LoadPath
  769.             ELSE IF command = 2 THEN CALL SavePath
  770.             ELSE IF command = 3 THEN CALL DefFreehand
  771.             ELSE IF command = 4 THEN CALL DefLinear
  772.             ELSE IF command = 5 THEN CALL EditPath
  773.             ELSE IF command = 6 THEN CALL MoveResizePath
  774.             ELSE IF command = 7 THEN CALL CharSettings
  775.             ELSE IF command = 8 THEN CALL RotSettings
  776.             ELSE IF command = 9 THEN CALL ShearSettings
  777.             ELSE IF command = 10 THEN CALL BoldSettings
  778.             ELSE IF command = 11 THEN CALL ResizeSettings
  779.             ELSE IF command = 12 THEN CALL DisplayData
  780.             ELSE IF command = 13 THEN CALL PreviewPath
  781.         END
  782.     END
  783. END
  784.  
  785. CALL SavePathFile(tmpname)
  786. CALL Break_C
  787.  
  788. EXIT 0
  789.  
  790.  
  791.  
  792.  
  793.  
  794. DefData: PROCEDURE EXPOSE global.
  795.  
  796.     global.count  = 10
  797.     global.direct = 0
  798.     global.add    = 1
  799.  
  800.     global.fontpath = 'FONTS:'
  801.     global.font     = 'CGTimes'
  802.     global.char     = 'A'
  803.     global.size     = '45'
  804.     global.handle   = 1
  805.     global.aalias   = 0
  806.  
  807.     global.rotats  = 1
  808.     global.fromang = 0 * 10000
  809.     global.toang   = 0 * 10000
  810.     global.rotdir  = 0
  811.  
  812.     global.shears  = 1
  813.     global.fromsh  = 0 * 10000
  814.     global.tosh    = 0 * 10000
  815.  
  816.     global.resizes = 1
  817.     global.fromrs  = 100 * 10000
  818.     global.tors    = 100 * 10000
  819.  
  820.     global.bolds   = 1
  821.     global.frombdx = 0 * 10000
  822.     global.tobdx   = 0 * 10000
  823.     global.frombdy = 0 * 10000
  824.     global.tobdy   = 0 * 10000
  825.  
  826.     global.points = 0
  827.     DROP global.xcoord. global.ycoord.
  828.  
  829.     RETURN
  830.  
  831.  
  832.  
  833.  
  834. NewPath: PROCEDURE EXPOSE global.
  835.  
  836.     RequestResponse 'TITLE "'global.txt_title_new'" PROMPT "'global.txt_err_lost'"'
  837.     IF RC = 0 THEN DO
  838.         IF global.points > 0 THEN
  839.             CALL XorPath
  840.  
  841.         CALL DefData
  842.     END
  843.  
  844.     RETURN
  845.  
  846.  
  847.  
  848.  
  849. LoadPathFile: PROCEDURE EXPOSE global.
  850.  
  851.     ok = 0
  852.     IF OPEN('pfile', ARG(1), 'R') THEN DO
  853.         LockGUI
  854.         IF READLN('pfile') = 'PPAINT CPATH' THEN DO
  855.             IF READLN('pfile') = '1' THEN DO
  856.                 global.count  = READLN('pfile')
  857.                 global.direct = READLN('pfile')
  858.                 global.add    = READLN('pfile')
  859.  
  860.                 global.fontpath = READLN('pfile')
  861.                 global.font     = READLN('pfile')
  862.                 global.char     = READLN('pfile')
  863.                 global.size     = READLN('pfile')
  864.                 global.handle   = READLN('pfile')
  865.                 global.aalias   = READLN('pfile')
  866.  
  867.                 global.rotats  = READLN('pfile')
  868.                 global.fromang = READLN('pfile')
  869.                 global.toang   = READLN('pfile')
  870.                 global.rotdir  = READLN('pfile')
  871.  
  872.                 global.shears  = READLN('pfile')
  873.                 global.fromsh  = READLN('pfile')
  874.                 global.tosh    = READLN('pfile')
  875.  
  876.                 global.resizes = READLN('pfile')
  877.                 global.fromrs  = READLN('pfile')
  878.                 global.tors    = READLN('pfile')
  879.  
  880.                 global.bolds   = READLN('pfile')
  881.                 global.frombdx = READLN('pfile')
  882.                 global.tobdx   = READLN('pfile')
  883.                 global.frombdy = READLN('pfile')
  884.                 global.tobdy   = READLN('pfile')
  885.  
  886.                 global.points = READLN('pfile')
  887.  
  888.                 DO point = 0 FOR global.points
  889.                     xy = READLN('pfile')
  890.                     PARSE VAR xy global.xcoord.point global.ycoord.point .
  891.                 END
  892.                 ok = 1
  893.             END
  894.         END
  895.         CALL CLOSE('pfile')
  896.         UnlockGUI
  897.     END
  898.  
  899.     RETURN ok
  900.  
  901.  
  902.  
  903.  
  904. LoadPath: PROCEDURE EXPOSE global.
  905.  
  906.     RequestFile 'TITLE "'global.txt_title_load'"'
  907.     IF RC = 0 THEN DO
  908.         PARSE VALUE RESULT WITH '"' pfilename '"'
  909.  
  910.         IF global.points > 0 THEN DO
  911.             CALL XorPath
  912.             CALL DefData
  913.         END
  914.  
  915.         IF LoadPathFile(pfilename) THEN
  916.             CALL XorPath
  917.         ELSE DO
  918.             CALL DefData
  919.             RequestNotify 'TITLE "'global.txt_title_load'" PROMPT "'global.txt_err_load'"'
  920.         END
  921.     END
  922.  
  923.     RETURN
  924.  
  925.  
  926.  
  927.  
  928. SavePathFile: PROCEDURE EXPOSE global.
  929.  
  930.     ok = 0
  931.     IF OPEN('pfile', ARG(1), 'W') THEN DO
  932.         LockGUI
  933.         CALL WRITELN('pfile', 'PPAINT CPATH')
  934.         CALL WRITELN('pfile', '1')        /* version */
  935.  
  936.         CALL WRITELN('pfile', global.count)
  937.         CALL WRITELN('pfile', global.direct)
  938.         CALL WRITELN('pfile', global.add)
  939.  
  940.         CALL WRITELN('pfile', global.fontpath)
  941.         CALL WRITELN('pfile', global.font)
  942.       CALL WRITELN('pfile', global.char)
  943.         CALL WRITELN('pfile', global.size)
  944.         CALL WRITELN('pfile', global.handle)
  945.         CALL WRITELN('pfile', global.aalias)
  946.  
  947.         CALL WRITELN('pfile', global.rotats)
  948.         CALL WRITELN('pfile', global.fromang)
  949.         CALL WRITELN('pfile', global.toang)
  950.         CALL WRITELN('pfile', global.rotdir)
  951.  
  952.         CALL WRITELN('pfile', global.shears)
  953.         CALL WRITELN('pfile', global.fromsh)
  954.         CALL WRITELN('pfile', global.tosh)
  955.  
  956.         CALL WRITELN('pfile', global.resizes)
  957.         CALL WRITELN('pfile', global.fromrs)
  958.         CALL WRITELN('pfile', global.tors)
  959.  
  960.         CALL WRITELN('pfile', global.bolds)
  961.         CALL WRITELN('pfile', global.frombdx)
  962.         CALL WRITELN('pfile', global.tobdx)
  963.         CALL WRITELN('pfile', global.frombdy)
  964.         CALL WRITELN('pfile', global.tobdy)
  965.  
  966.         CALL WRITELN('pfile', global.points)
  967.  
  968.         DO point = 0 FOR global.points
  969.             CALL WRITELN('pfile', global.xcoord.point' 'global.ycoord.point)
  970.         END
  971.         ok = 1
  972.         CALL CLOSE('pfile')
  973.         UnlockGUI
  974.     END
  975.  
  976.     RETURN ok
  977.  
  978.  
  979.  
  980.  
  981. SavePath: PROCEDURE EXPOSE global.
  982.  
  983.     IF global.points = 0 THEN DO
  984.         RequestNotify 'TITLE "'global.txt_title_save'" PROMPT "'global.txt_err_nopath'"'
  985.         RETURN
  986.     END
  987.  
  988.     RequestFile 'TITLE "'global.txt_title_save'" SAVEMODE'
  989.     IF RC = 0 THEN DO
  990.         PARSE VALUE RESULT WITH '"' pfilename '"'
  991.         IF ~SavePathFile(pfilename) THEN
  992.             RequestNotify 'TITLE "'global.txt_title_save'" PROMPT "'global.txt_err_save'"'
  993.     END
  994.  
  995.     RETURN
  996.  
  997.  
  998.  
  999.  
  1000. XorVertex: PROCEDURE EXPOSE global.
  1001.  
  1002.     point = ARG(1)
  1003.  
  1004.     IF point > 0 THEN DO
  1005.         IF point = 1 THEN
  1006.             nfp = ''
  1007.         ELSE
  1008.             nfp = 'NOFIRSTPIXEL'
  1009.         ppt = point - 1
  1010.         DrawLine global.xcoord.ppt global.ycoord.ppt global.xcoord.point global.ycoord.point 'COMPLEMENT' nfp
  1011.     END
  1012.     npt = point + 1
  1013.     IF npt < global.points THEN DO
  1014.         IF point = 0 THEN
  1015.             nfp = ''
  1016.         ELSE
  1017.             nfp = 'NOFIRSTPIXEL'
  1018.         DrawLine global.xcoord.point global.ycoord.point global.xcoord.npt global.ycoord.npt 'COMPLEMENT' nfp
  1019.     END
  1020.  
  1021.     RETURN
  1022.  
  1023.  
  1024.  
  1025.  
  1026. EditPath: PROCEDURE EXPOSE global.
  1027.  
  1028.     IF global.points = 0 THEN DO
  1029.         RequestNotify 'TITLE "'global.txt_title_edit'" PROMPT "'global.txt_err_nopath'"'
  1030.         RETURN
  1031.     END
  1032.  
  1033.     SetPointer 'DATA ',
  1034.         '"0xC000,0x7000,0x3C00,0x3F00,0x1F00,0x1E00,0x0B00,0x0980,',
  1035.         ' 0x0080,0x0000,0x0018,0x003C,0x0018,',
  1036.         ' 0x4000,0xB000,0x4C00,0x4300,0x2000,0x2200,0x1500,0x1280,',
  1037.         ' 0x0100,0x0000,0x0028,0x0044,0x0028" ',
  1038.         'HEIGHT 13 OFFSETX -1 OFFSETY 0'
  1039.  
  1040.     DO FOREVER
  1041.         WaitForClick 'DOWN POINT SHOWBRUSH'
  1042.         IF RC = 0 THEN DO
  1043.             PARSE VAR RESULT button xp yp .
  1044.  
  1045.             IF button > 1 THEN
  1046.                 LEAVE
  1047.             mindist = 30000
  1048.             DO point = 0 FOR global.points
  1049.                 GetDistance xp yp global.xcoord.point global.ycoord.point 'IMAGERATIO'
  1050.                 IF RESULT < mindist THEN DO
  1051.                     mindist = RESULT
  1052.                     mindpt = point
  1053.                 END
  1054.             END
  1055.             point = mindpt
  1056.             prev_xp = xp
  1057.             prev_yp = yp
  1058.             drawn = 0
  1059.  
  1060.             DO FOREVER
  1061.                 GetMousePosition
  1062.                 PARSE VAR RESULT xp yp .
  1063.  
  1064.                 IF xp ~= prev_xp | yp ~= prev_yp | ~drawn THEN DO
  1065.                     CALL XorVertex(point)
  1066.                     global.xcoord.point = xp
  1067.                     global.ycoord.point = yp
  1068.                     CALL XorVertex(point)
  1069.  
  1070.                     prev_xp = xp
  1071.                     prev_yp = yp
  1072.                     drawn = 1
  1073.                 END
  1074.                 ELSE WaitForEvent
  1075.  
  1076.                 GetMouseButton
  1077.                 IF RESULT = 0 THEN
  1078.                     LEAVE
  1079.             END
  1080.         END
  1081.         ELSE LEAVE
  1082.     END
  1083.     SetPointer
  1084.     RETURN
  1085.  
  1086.  
  1087.  
  1088.  
  1089. MoveResizePath: PROCEDURE EXPOSE global.
  1090.  
  1091.     IF global.points = 0 THEN DO
  1092.         RequestNotify 'TITLE "'global.txt_title_movrs'" PROMPT "'global.txt_err_nopath'"'
  1093.         RETURN
  1094.     END
  1095.  
  1096.     SetPointer 'DATA ',
  1097.         '"0xC000,0x7000,0x3C00,0x3F00,0x1FC0,0x1FC0,0x0F00,0x0D80,',
  1098.         ' 0x04C0,0x0460,0x0020,',
  1099.         ' 0x4000,0xB000,0x4C00,0x4300,0x20C0,0x2000,0x1100,0x1280,',
  1100.         ' 0x0940,0x08A0,0x0040" ',
  1101.         'HEIGHT 11 OFFSETX -1 OFFSETY 0'
  1102.     minx = 32000
  1103.     miny = 32000
  1104.     maxx = -32000
  1105.     maxy = -32000
  1106.     DO point = 0 FOR global.points
  1107.         IF global.xcoord.point < minx THEN minx = global.xcoord.point
  1108.         IF global.xcoord.point > maxx THEN maxx = global.xcoord.point
  1109.         IF global.ycoord.point < miny THEN miny = global.ycoord.point
  1110.         IF global.ycoord.point > maxy THEN maxy = global.ycoord.point
  1111.  
  1112.         origxc.point = global.xcoord.point
  1113.         origyc.point = global.ycoord.point
  1114.     END
  1115.     w1 = maxx - minx
  1116.     h1 = maxy - miny
  1117.     minx00 = minx
  1118.     miny00 = miny
  1119.     w100 = w1
  1120.     h100 = h1
  1121.  
  1122.     DO FOREVER
  1123.         WaitForClick 'DOWN POINT'
  1124.         IF RC = 0 THEN DO
  1125.             PARSE VAR RESULT button xp yp .
  1126.  
  1127.             IF button > 1 THEN
  1128.                 LEAVE
  1129.             resize = (xp > minx+w1/2 & yp > miny+h1/2)
  1130.             IF resize THEN DO
  1131.                 SetPointer 'DATA ',
  1132.                     '"0xC000,0x7000,0x3C00,0x3F00,0x1F00,0x1E00,0x0B00,0x0980,',
  1133.                     ' 0x00E0,0x00A0,0x00FE,0x0022,0x0022,0x0022,0x003E,',
  1134.                     ' 0x4000,0xB000,0x4C00,0x4300,0x2000,0x2200,0x1500,0x1280,',
  1135.                     ' 0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000" ',
  1136.                     'HEIGHT 15 OFFSETX -1 OFFSETY 0'
  1137.                 w10 = w1
  1138.                 h10 = h1
  1139.             END
  1140.             ELSE DO
  1141.                 minx0 = minx
  1142.                 miny0 = miny
  1143.             END
  1144.             CALL XorPath
  1145.             DrawRectangle minx miny maxx maxy 'COMPLEMENT'
  1146.             prev_xp = xp
  1147.             prev_yp = yp
  1148.  
  1149.             DO FOREVER
  1150.                 GetMousePosition
  1151.                 PARSE VAR RESULT xp yp .
  1152.  
  1153.                 IF xp ~= prev_xp | yp ~= prev_yp THEN DO
  1154.                     DrawRectangle minx miny maxx maxy 'COMPLEMENT'
  1155.                     IF resize THEN DO
  1156.                         w1 = w1 + (xp - prev_xp)
  1157.                         h1 = h1 + (yp - prev_yp)
  1158.                         IF w1 < 1 THEN w1 = 1
  1159.                         IF h1 < 1 THEN h1 = 1
  1160.                         maxx = minx + w1
  1161.                         maxy = miny + h1
  1162.                     END
  1163.                     ELSE DO
  1164.                         minx = minx + (xp - prev_xp)
  1165.                         miny = miny + (yp - prev_yp)
  1166.                         maxx = minx + w1
  1167.                         maxy = miny + h1
  1168.                     END
  1169.                     DrawRectangle minx miny maxx maxy 'COMPLEMENT'
  1170.                     prev_xp = xp
  1171.                     prev_yp = yp
  1172.                 END
  1173.                 ELSE WaitForEvent
  1174.  
  1175.                 GetMouseButton
  1176.                 IF RESULT = 0 THEN
  1177.                     LEAVE
  1178.             END
  1179.  
  1180.             DrawRectangle minx miny maxx maxy 'COMPLEMENT'
  1181.             IF resize THEN DO
  1182.                 IF w10 ~= w1 | h10 ~= h1 THEN DO
  1183.                     mx = w1 / w100
  1184.                     my = h1 / h100
  1185.                     DO point = 0 FOR global.points
  1186.                         global.xcoord.point = minx + TRUNC((origxc.point - minx00) * mx)
  1187.                         global.ycoord.point = miny + TRUNC((origyc.point - miny00) * my)
  1188.                     END
  1189.                 END
  1190.                 SetPointer 'DATA ',
  1191.                     '"0xC000,0x7000,0x3C00,0x3F00,0x1FC0,0x1FC0,0x0F00,0x0D80,',
  1192.                     ' 0x04C0,0x0460,0x0020,',
  1193.                     ' 0x4000,0xB000,0x4C00,0x4300,0x20C0,0x2000,0x1100,0x1280,',
  1194.                     ' 0x0940,0x08A0,0x0040" ',
  1195.                     'HEIGHT 11 OFFSETX -1 OFFSETY 0'
  1196.             END
  1197.             ELSE DO
  1198.                 IF minx ~= minx0 | miny ~= miny0 THEN DO
  1199.                     dx = minx - minx0
  1200.                     dy = miny - miny0
  1201.                     DO point = 0 FOR global.points
  1202.                         global.xcoord.point = global.xcoord.point + dx
  1203.                         global.ycoord.point = global.ycoord.point + dy
  1204.                     END
  1205.                 END
  1206.             END
  1207.             CALL XorPath
  1208.         END
  1209.         ELSE LEAVE
  1210.     END
  1211.     SetPointer
  1212.  
  1213.     RETURN
  1214.  
  1215.  
  1216.  
  1217.  
  1218. SetFirstChar: PROCEDURE EXPOSE global.
  1219.  
  1220.     SetCurrentBrush 'BRUSH' global.tbshnum
  1221.     IF RC ~= 0 THEN
  1222.         RETURN
  1223.  
  1224.     global.rot_ang = global.fromang
  1225.     global.shear = global.fromsh
  1226.     global.bold_x = global.frombdx
  1227.     global.bold_y = global.frombdy
  1228.     global.resize = global.fromrs
  1229.     IF CreateCharacter(0) THEN DO
  1230.         SetPaintMode 'COLOR'
  1231.         SetPen 'FOREGROUND' global.savepen
  1232.         RETURN 1
  1233.     END
  1234.  
  1235.     RETURN 0
  1236.  
  1237.  
  1238.  
  1239.  
  1240. DefFreehand: PROCEDURE EXPOSE global.
  1241.  
  1242.     LockGUI
  1243.     IF global.points > 0 THEN DO
  1244.         CALL XorPath
  1245.         DROP global.xcoord. global.ycoord.
  1246.         global.points = 0
  1247.     END
  1248.  
  1249.     IF ~SetFirstChar() THEN DO
  1250.         RequestNotify 'TITLE "'global.txt_title_fhand'" PROMPT "'global.txt_err_rend'"'
  1251.         UnlockGUI
  1252.         RETURN
  1253.     END
  1254.     UnlockGUI
  1255.  
  1256.     button = 0
  1257.     WaitForClick 'DOWN POINT SHOWBRUSH'
  1258.     IF RC = 0 THEN
  1259.         PARSE VAR RESULT button x0 y0 .
  1260.  
  1261.     FreeBrush 'FORCE QUIET'
  1262.     SetCurrentBrush 'RECTANGULAR WIDTH 1 HEIGHT 1'
  1263.     SetPen 'FOREGROUND' global.xorpen
  1264.  
  1265.     IF button > 0 THEN DO
  1266.         prev_xp = x0
  1267.         prev_yp = y0
  1268.         global.xcoord.0 = x0
  1269.         global.ycoord.0 = y0
  1270.         point = 1
  1271.  
  1272.         DO FOREVER
  1273.             GetMousePosition
  1274.             PARSE VAR RESULT xp yp .
  1275.  
  1276.             IF xp ~= prev_xp | yp ~= prev_yp THEN DO
  1277.                 IF point = 1 THEN
  1278.                     nfp = ''
  1279.                 ELSE
  1280.                     nfp = 'NOFIRSTPIXEL'
  1281.                 DrawLine prev_xp prev_yp xp yp 'COMPLEMENT' nfp
  1282.  
  1283.                 global.xcoord.point = xp
  1284.                 global.ycoord.point = yp
  1285.                 point = point + 1
  1286.  
  1287.                 prev_xp = xp
  1288.                 prev_yp = yp
  1289.             END
  1290.             ELSE WaitForEvent
  1291.  
  1292.             GetMouseButton
  1293.             IF RESULT ~= button THEN
  1294.                 LEAVE
  1295.         END
  1296.         IF point = 1 THEN DO
  1297.             point = 2
  1298.             global.xcoord.1 = global.xcoord.0
  1299.             global.ycoord.1 = global.ycoord.0
  1300.         END
  1301.         global.points = point
  1302.     END
  1303.  
  1304.     RETURN
  1305.  
  1306.  
  1307.  
  1308.  
  1309. DefLinear: PROCEDURE EXPOSE global.
  1310.  
  1311.     LockGUI
  1312.     IF global.points > 0 THEN DO
  1313.         CALL XorPath
  1314.         DROP global.xcoord. global.ycoord.
  1315.         global.points = 0
  1316.     END
  1317.  
  1318.     IF ~SetFirstChar() THEN DO
  1319.         RequestNotify 'TITLE "'global.txt_title_fhand'" PROMPT "'global.txt_err_rend'"'
  1320.         UnlockGUI
  1321.         RETURN
  1322.     END
  1323.     UnlockGUI
  1324.  
  1325.     button = 0
  1326.     WaitForClick 'DOWN POINT SHOWBRUSH'
  1327.     IF RC = 0 THEN
  1328.         PARSE VAR RESULT button x0 y0 .
  1329.  
  1330.     FreeBrush 'FORCE QUIET'
  1331.     SetCurrentBrush 'RECTANGULAR WIDTH 1 HEIGHT 1'
  1332.     SetPen 'FOREGROUND' global.xorpen
  1333.  
  1334.     IF button > 0 THEN DO
  1335.         prev_xp = x0
  1336.         prev_yp = y0
  1337.         global.xcoord.0 = x0
  1338.         global.ycoord.0 = y0
  1339.         drawn = 0
  1340.  
  1341.         DO FOREVER
  1342.             GetMousePosition
  1343.             PARSE VAR RESULT xp yp .
  1344.  
  1345.             IF xp ~= prev_xp | yp ~= prev_yp | ~drawn THEN DO
  1346.                 IF drawn THEN
  1347.                     Undo
  1348.                 DrawLine x0 y0 xp yp 'COMPLEMENT'
  1349.  
  1350.                 global.xcoord.1 = xp
  1351.                 global.ycoord.1 = yp
  1352.                 prev_xp = xp
  1353.                 prev_yp = yp
  1354.                 drawn = 1
  1355.             END
  1356.             ELSE WaitForEvent
  1357.  
  1358.             GetMouseButton
  1359.             IF RESULT ~= button THEN
  1360.                 LEAVE
  1361.         END
  1362.         global.points = 2
  1363.     END
  1364.  
  1365.     RETURN
  1366.  
  1367.  
  1368.  
  1369.  
  1370. InitStep: PROCEDURE EXPOSE global.
  1371.  
  1372.     IF global.points = 2 THEN DO
  1373.         IF global.count > 1 THEN DO
  1374.             global.line_xs = (global.xcoord.1 - global.xcoord.0) / (global.count - 1)
  1375.             global.line_ys = (global.ycoord.1 - global.ycoord.0) / (global.count - 1)
  1376.         END
  1377.         ELSE DO
  1378.             global.line_xs = 0
  1379.             global.line_ys = 0
  1380.         END
  1381.         global.line_xp = global.xcoord.0
  1382.         global.line_yp = global.ycoord.0
  1383.     END
  1384.     ELSE DO
  1385.         global.point_s = global.points / global.count
  1386.         global.point_p = 0
  1387.     END
  1388.  
  1389.     IF global.fromang ~= global.toang | global.rotats > 1 THEN DO
  1390.         global.do_rot = 1
  1391.         IF global.fromang > global.toang & global.rotdir = 0 THEN
  1392.             rotdeg = (3600000 - global.fromang) + global.toang
  1393.         ELSE IF global.fromang < global.toang & global.rotdir = 1 THEN
  1394.             rotdeg = global.fromang + (3600000 - global.toang)
  1395.         ELSE
  1396.             rotdeg = ABS(global.toang - global.fromang)
  1397.  
  1398.         rotdeg = rotdeg + ((global.rotats - 1) * 3600000)
  1399.         IF global.count > 1 THEN
  1400.             global.rot_step =    rotdeg / (global.count - 1)
  1401.         ELSE
  1402.             global.rot_step =    0
  1403.         IF global.rotdir > 0 THEN
  1404.             global.rot_step = -global.rot_step
  1405.     END
  1406.     ELSE
  1407.         global.do_rot = 0
  1408.     global.rot_ang = global.fromang
  1409.  
  1410.     IF global.fromsh ~= global.tosh | global.shears > 1 THEN DO
  1411.         global.do_shear = 1
  1412.         shr_deg = ABS(global.tosh - global.fromsh)
  1413.         IF global.count > 1 THEN
  1414.             global.shear_s = (shr_deg * global.shears) / (global.count - 1)
  1415.         ELSE
  1416.             global.shear_s =    0
  1417.         IF global.tosh < global.fromsh THEN
  1418.             global.shear_s = -global.shear_s
  1419.         global.min_sh = MIN(global.fromsh, global.tosh)
  1420.         global.max_sh = MAX(global.fromsh, global.tosh)
  1421.     END
  1422.     ELSE
  1423.         global.do_shear = 0
  1424.     global.shear = global.fromsh
  1425.  
  1426.     IF global.frombdx ~= global.tobdx | global.frombdy ~= global.tobdy | global.bolds > 1 THEN DO
  1427.         global.do_bold = 1
  1428.         boldx = ABS(global.tobdx - global.frombdx)
  1429.         IF global.count > 1 THEN
  1430.             global.bold_sx =    (boldx * global.bolds) / (global.count - 1)
  1431.         ELSE
  1432.             global.bold_sx =    0
  1433.         IF global.tobdx < global.frombdx THEN
  1434.             global.bold_sx = -global.bold_sx
  1435.         global.min_bdx = MIN(global.frombdx, global.tobdx)
  1436.         global.max_bdx = MAX(global.frombdx, global.tobdx)
  1437.  
  1438.         boldy = ABS(global.tobdy - global.frombdy)
  1439.         IF global.count > 1 THEN
  1440.             global.bold_sy =    (boldy * global.bolds) / (global.count - 1)
  1441.         ELSE
  1442.             global.bold_sy =    0
  1443.         IF global.tobdy < global.frombdy THEN
  1444.             global.bold_sy = -global.bold_sy
  1445.         global.min_bdy = MIN(global.frombdy, global.tobdy)
  1446.         global.max_bdy = MAX(global.frombdy, global.tobdy)
  1447.     END
  1448.     ELSE
  1449.         global.do_bold = 0
  1450.     global.bold_x = global.frombdx
  1451.     global.bold_y = global.frombdy
  1452.  
  1453.     IF global.fromrs ~= global.tors | global.resizes > 1 THEN DO
  1454.         global.do_resize = 1
  1455.         resz = ABS(global.tors - global.fromrs)
  1456.         IF global.count > 1 THEN
  1457.             global.resize_s = (resz * global.resizes) / (global.count - 1)
  1458.         ELSE
  1459.             global.resize_s =    0
  1460.         IF global.tors < global.fromrs THEN
  1461.             global.resize_s = -global.resize_s
  1462.         global.min_rs = MIN(global.fromrs, global.tors)
  1463.         global.max_rs = MAX(global.fromrs, global.tors)
  1464.     END
  1465.     ELSE
  1466.         global.do_resize = 0
  1467.     global.resize = global.fromrs
  1468.  
  1469.     RETURN
  1470.  
  1471.  
  1472.  
  1473.  
  1474. GetStep: PROCEDURE EXPOSE global.
  1475.  
  1476.     IF global.points = 2 THEN DO
  1477.         xp = TRUNC(global.line_xp + 0.5)
  1478.         yp = TRUNC(global.line_yp + 0.5)
  1479.     END
  1480.     ELSE DO
  1481.         point = TRUNC(global.point_p + 0.5)
  1482.         xp = global.xcoord.point
  1483.         yp = global.ycoord.point
  1484.     END
  1485.  
  1486.     RETURN xp yp
  1487.  
  1488.  
  1489.  
  1490.  
  1491. CreateCharacter: PROCEDURE EXPOSE global.
  1492.  
  1493.     antialias = ARG(1)
  1494.     ang  = TRUNC(global.rot_ang / 10 + 0.5)
  1495.     shr  = TRUNC(global.shear / 10 + 0.5 * SIGN(global.shear))
  1496.     bldx = TRUNC(global.bold_x / 10 + 0.5 * SIGN(global.bold_x))
  1497.     bldy = TRUNC(global.bold_y / 10 + 0.5 * SIGN(global.bold_y))
  1498.  
  1499.     IF global.resize ~= 1000000 THEN DO
  1500.         siz = TRUNC(global.size * (global.resize / 1000000) + 0.5)
  1501.         IF siz < 1 THEN
  1502.             siz = 1
  1503.     END
  1504.     ELSE siz = global.size
  1505.  
  1506.     IF global.char = '"' THEN
  1507.         chr = '""'
  1508.     ELSE
  1509.         chr = global.char
  1510.  
  1511.     VectorCharacter 'CHARACTER "'chr'" FONTPATH "'global.fontpath'" FONTNAME "'global.font'" HEIGHT 'siz' ANGLE 'ang' SHEAR 'shr' BOLDX 'bldx' BOLDY 'bldy' ANTIALIAS 'antialias
  1512.     IF RC = 0 THEN DO
  1513.         PARSE VAR RESULT . . hx hy .
  1514.  
  1515.         IF global.handle = 1 THEN
  1516.             SetBrushAttributes 'HANDLEX 'hx' HANDLEY 'hy
  1517.         ELSE IF global.handle = 2 THEN DO
  1518.             GetBrushAttributes 'BOUNDARIES'
  1519.             PARSE VAR RESULT x0 y0 x1 y1 .
  1520.             SetBrushAttributes 'HANDLEX 'x0+((x1-x0+1)%2)' HANDLEY 'y0+((y1-y0+1)%2)
  1521.         END
  1522.         RETURN 1
  1523.     END
  1524.  
  1525.     RETURN 0
  1526.  
  1527.  
  1528.  
  1529.  
  1530. PreviewStep: PROCEDURE EXPOSE global.
  1531.  
  1532.     IF CreateCharacter(0) THEN DO
  1533.         SetPaintMode 'COLOR'
  1534.         Undo global.prvwundo
  1535.  
  1536.         IF ~global.add & global.prvwundo ~= 0 THEN DO
  1537.             IF global.direct = 0 THEN
  1538.                 SetFramePosition 'NEXT'
  1539.             ELSE IF global.direct = 1 THEN
  1540.                 SetFramePosition 'PREVIOUS'
  1541.         END
  1542.         PutBrush ARG(1)
  1543.         global.prvwundo = 1
  1544.         RETURN 1
  1545.     END
  1546.  
  1547.     RETURN 0
  1548.  
  1549.  
  1550.  
  1551.  
  1552. NextStep: PROCEDURE EXPOSE global.
  1553.  
  1554.     IF global.points = 2 THEN DO
  1555.         global.line_xp = global.line_xp + global.line_xs
  1556.         global.line_yp = global.line_yp + global.line_ys
  1557.     END
  1558.     ELSE
  1559.         global.point_p = global.point_p + global.point_s
  1560.  
  1561.     IF global.do_rot THEN
  1562.         global.rot_ang = global.rot_ang + global.rot_step
  1563.  
  1564.     IF global.do_shear THEN DO
  1565.         global.shear = global.shear + global.shear_s
  1566.         IF global.shear_s > 0 THEN DO
  1567.             IF global.shear > global.max_sh THEN DO
  1568.                 excd = global.shear - global.max_sh
  1569.                 global.shear = global.max_sh - excd
  1570.                 global.shear_s = -global.shear_s
  1571.             END
  1572.         END
  1573.         ELSE DO
  1574.             IF global.shear < global.min_sh THEN DO
  1575.                 excd = global.min_sh - global.shear
  1576.                 global.shear = global.min_sh + excd
  1577.                 global.shear_s = -global.shear_s
  1578.             END
  1579.         END
  1580.     END
  1581.  
  1582.     IF global.do_bold THEN DO
  1583.         global.bold_x = global.bold_x + global.bold_sx
  1584.         IF global.bold_sx > 0 THEN DO
  1585.             IF global.bold_x > global.max_bdx THEN DO
  1586.                 excd = global.bold_x - global.max_bdx
  1587.                 global.bold_x = global.max_bdx - excd
  1588.                 global.bold_sx = -global.bold_sx
  1589.             END
  1590.         END
  1591.         ELSE DO
  1592.             IF global.bold_x < global.min_bdx THEN DO
  1593.                 excd = global.min_bdx - global.bold_x
  1594.                 global.bold_x = global.min_bdx + excd
  1595.                 global.bold_sx = -global.bold_sx
  1596.             END
  1597.         END
  1598.  
  1599.         global.bold_y = global.bold_y + global.bold_sy
  1600.         IF global.bold_sy > 0 THEN DO
  1601.             IF global.bold_y > global.max_bdy THEN DO
  1602.                 excd = global.bold_y - global.max_bdy
  1603.                 global.bold_y = global.max_bdy - excd
  1604.                 global.bold_sy = -global.bold_sy
  1605.             END
  1606.         END
  1607.         ELSE DO
  1608.             IF global.bold_y < global.min_bdy THEN DO
  1609.                 excd = global.min_bdy - global.bold_y
  1610.                 global.bold_y = global.min_bdy + excd
  1611.                 global.bold_sy = -global.bold_sy
  1612.             END
  1613.         END
  1614.     END
  1615.  
  1616.     IF global.do_resize THEN DO
  1617.         global.resize = global.resize + global.resize_s
  1618.         IF global.resize_s > 0 THEN DO
  1619.             IF global.resize > global.max_rs THEN DO
  1620.                 excd = global.resize - global.max_rs
  1621.                 global.resize = global.max_rs - excd
  1622.                 global.resize_s = -global.resize_s
  1623.             END
  1624.         END
  1625.         ELSE DO
  1626.             IF global.resize < global.min_rs THEN DO
  1627.                 excd = global.min_rs - global.resize
  1628.                 global.resize = global.min_rs + excd
  1629.                 global.resize_s = -global.resize_s
  1630.             END
  1631.         END
  1632.     END
  1633.  
  1634.     RETURN
  1635.  
  1636.  
  1637.  
  1638.  
  1639. PreviewBegin: PROCEDURE EXPOSE global.
  1640.  
  1641.     SetCurrentBrush 'BRUSH' global.tbshnum
  1642.     SetPen 'FOREGROUND' global.savepen
  1643.     GetFramePosition
  1644.     IF RC = 0 THEN
  1645.         global.savefrpos = RESULT
  1646.     ELSE
  1647.         global.savefrpos = 0
  1648.     global.prvwundo = 0
  1649.  
  1650.     RETURN
  1651.  
  1652.  
  1653.  
  1654.  
  1655. PreviewEnd: PROCEDURE EXPOSE global.
  1656.  
  1657.     Undo global.prvwundo
  1658.     FreeBrush 'FORCE QUIET'
  1659.     SetCurrentBrush 'RECTANGULAR WIDTH 1 HEIGHT 1'
  1660.     SetPen 'FOREGROUND' global.xorpen
  1661.     IF global.savefrpos > 0 THEN
  1662.         SetFramePosition global.savefrpos
  1663.  
  1664.     RETURN
  1665.  
  1666.  
  1667.  
  1668.  
  1669. PreviewPath: PROCEDURE EXPOSE global.
  1670.  
  1671.     IF global.points = 0 THEN DO
  1672.         RequestNotify 'TITLE "'global.txt_title_pview'" PROMPT "'global.txt_err_nopath'"'
  1673.         RETURN
  1674.     END
  1675.     LockGUI
  1676.     CALL XorPath
  1677.     CALL InitStep
  1678.     CALL PreviewBegin
  1679.  
  1680.     DO cnt = 1 to global.count
  1681.         IF ~PreviewStep( GetStep() ) THEN DO
  1682.             RequestNotify 'TITLE "'global.txt_title_pview'" PROMPT "'global.txt_err_rend'"'
  1683.             LEAVE
  1684.         END
  1685.         Wait 'TIME 200'
  1686.         CALL NextStep()
  1687.     END
  1688.     Wait 'TIME 200'
  1689.  
  1690.     CALL PreviewEnd
  1691.     CALL XorPath
  1692.     UnlockGUI
  1693.  
  1694.     RETURN
  1695.  
  1696.  
  1697.  
  1698.  
  1699. DrawStep: PROCEDURE EXPOSE global.
  1700.  
  1701.     IF CreateCharacter(global.aalias) THEN DO
  1702.         pos = ARG(1)
  1703.         PARSE VAR pos px py .
  1704.         SetPaintMode 'COLOR'
  1705.  
  1706.         IF global.aalias > 0 THEN DO
  1707.             Process 'IMAGE BRUSHMODE X0 'px' Y0 'py' FILTER "Brush Alpha Channel (Single)" NOFS'
  1708.             IF RC ~= 0 THEN DO
  1709.                 IF RC ~= 5 THEN
  1710.                     RequestNotify 'PROMPT "'global.txt_err_rend'('RC')"'
  1711.                 RETURN 0
  1712.             END
  1713.         END
  1714.         ELSE PutBrush px py
  1715.  
  1716.         global.prvwundo = 1
  1717.         RETURN 1
  1718.     END
  1719.  
  1720.     RETURN 0
  1721.  
  1722.  
  1723.  
  1724.  
  1725. DrawIt: PROCEDURE EXPOSE global.
  1726.  
  1727.     IF global.points = 0 THEN DO
  1728.         RequestNotify 'TITLE "'global.txt_title_draw'" PROMPT "'global.txt_err_nopath'"'
  1729.         RETURN 0
  1730.     END
  1731.     LockGUI
  1732.     CALL XorPath
  1733.     CALL InitStep
  1734.     global.pathdisp = 0
  1735.     SetCurrentBrush 'BRUSH' global.tbshnum
  1736.     SetPen 'FOREGROUND' global.savepen
  1737.  
  1738.     IF global.add THEN DO
  1739.         GetFramePosition
  1740.         IF RC = 0 THEN
  1741.             frpos = RESULT
  1742.         ELSE
  1743.             frpos = 0
  1744.         AddFrames global.count
  1745.         IF global.direct = 1 THEN
  1746.             SetFramePosition frpos + global.count
  1747.     END
  1748.  
  1749.     DO cnt = 1 to global.count
  1750.         IF ~DrawStep( GetStep() ) THEN DO
  1751.             RequestNotify 'TITLE "'global.txt_title_draw'" PROMPT "'global.txt_err_rend'"'
  1752.             LEAVE
  1753.         END
  1754.         IF global.direct = 0 THEN
  1755.             SetFramePosition 'NEXT'
  1756.         ELSE IF global.direct = 1 THEN
  1757.             SetFramePosition 'PREVIOUS'
  1758.         CALL NextStep()
  1759.     END
  1760.  
  1761.     FreeBrush 'FORCE QUIET'
  1762.     SetCurrentBrush 'RECTANGULAR WIDTH 1 HEIGHT 1'
  1763.     SetPen 'FOREGROUND' global.xorpen
  1764.     UnlockGUI
  1765.  
  1766.     RETURN 1
  1767.  
  1768.  
  1769.  
  1770.  
  1771. CharSettings: PROCEDURE EXPOSE global.
  1772.  
  1773.     IF global.fontnum = 0 THEN DO
  1774.         LockGUI
  1775.         global.fontpath = LoadSet('PP_VectorPath', global.fontpath, 1, 0)
  1776.  
  1777.         ftot = 0
  1778.         vftfname = 'ENV:PP_VectorFonts'
  1779.         IF ~OPEN(fexists, vftfname) THEN DO
  1780.             ADDRESS COMMAND 'List >'vftfname' 'global.fontpath' PAT=#?.otag NOHEAD LFORMAT="%s"'
  1781.             ADDRESS COMMAND 'Sort 'vftfname vftfname'.s'
  1782.             IF RC = 0 THEN DO
  1783.                 ADDRESS COMMAND 'Delete >NIL: 'vftfname
  1784.                 ADDRESS COMMAND 'Copy >NIL: 'vftfname'.s' vftfname
  1785.                 ADDRESS COMMAND 'Delete >NIL: 'vftfname'.s'
  1786.             END
  1787.         END
  1788.         ELSE CALL CLOSE(fexists)
  1789.  
  1790.         IF OPEN('listfile', vftfname) THEN DO
  1791.             DO FOREVER
  1792.                 fline = READLN('listfile')
  1793.                 IF EOF('listfile') THEN BREAK
  1794.                 ftot = ftot + 1
  1795.                 global.fontname.ftot = LEFT(fline, LENGTH(fline) - 5)
  1796.             END
  1797.             CALL CLOSE('listfile')
  1798.         END
  1799.         UnlockGUI
  1800.  
  1801.         IF ftot = 0 THEN DO
  1802.             RequestNotify 'PROMPT "'global.txt_err_nofonts'"'
  1803.             RETURN
  1804.         END
  1805.         global.fontnum = ftot
  1806.     END
  1807.  
  1808.     selfont = 0
  1809.     DO f = 1 TO global.fontnum
  1810.         IF UPPER(global.fontname.f) = UPPER(global.font) THEN DO
  1811.             selfont = f - 1
  1812.             LEAVE
  1813.         END
  1814.     END
  1815.  
  1816.     req = '"LIST = ""'global.txt_gad_font'"", 'global.fontnum', 'selfont', 20, 5'
  1817.     DO f = 1 TO global.fontnum
  1818.         req = req || ', ""' || global.fontname.f || '""'
  1819.     END
  1820.     req = req ||,
  1821.          ' VSPACE = 2 ' ||,
  1822.           'STRING = ""'global.txt_gad_char'"", 2, ""'global.char'"" ' ||,
  1823.           'VSPACE = 2 ' ||,
  1824.          'INTSTR = ""'global.txt_gad_size'"", 1, 32000, 'global.size' ' ||,
  1825.           'VSPACE = 2 ' ||,
  1826.             'CYCLE = ""'global.txt_gad_handle'"", 3, 'global.handle', ""'global.txt_gad_handl.0'"", ""'global.txt_gad_handl.1'"", ""'global.txt_gad_handl.2'"" ' ||,
  1827.           'VSPACE = 2 ' ||,
  1828.             'CYCLE = ""'global.txt_gad_aalias'"", 4, 'global.aalias', ""'global.txt_gad_aals.0'"", ""'global.txt_gad_aals.1'"", ""'global.txt_gad_aals.2'"", ""'global.txt_gad_aals.3'"" ' ||,
  1829.           'VSPACE = 2 "'
  1830.  
  1831.     Request 'RESIZE COMPACT "'global.txt_title_char'" 'req
  1832.     IF RC = 0 THEN DO
  1833.         fn = RESULT.1 + 1
  1834.         global.font = global.fontname.fn
  1835.         global.char = RESULT.2
  1836.         global.size = RESULT.3
  1837.         global.handle = RESULT.4
  1838.         global.aalias = RESULT.5
  1839.     END
  1840.  
  1841.     RETURN
  1842.  
  1843.  
  1844.  
  1845.  
  1846. RotSettings: PROCEDURE EXPOSE global.
  1847.  
  1848.     Request '"'global.txt_title_crot'" ',
  1849.             '"INTSTR = ""'global.txt_gad_rotats'"", 1, 32000, 'global.rotats' ',
  1850.             ' INT10000STR = ""'global.txt_gad_fromang'"", 0, 3590000, 'global.fromang' ',
  1851.             ' INT10000STR = ""'global.txt_gad_toang'"", 0, 3590000, 'global.toang' ',
  1852.             ' CYCLE = ""'global.txt_gad_rotdir'"", 2, 'global.rotdir', ""'global.txt_gad_rotdr.0'"", ""'global.txt_gad_rotdr.1'"" "'
  1853.     IF RC = 0 THEN DO
  1854.         global.rotats = RESULT.1
  1855.         global.fromang = RESULT.2
  1856.         global.toang = RESULT.3
  1857.         global.rotdir = RESULT.4
  1858.     END
  1859.  
  1860.     RETURN
  1861.  
  1862.  
  1863.  
  1864.  
  1865. ShearSettings: PROCEDURE EXPOSE global.
  1866.  
  1867.     Request '"'global.txt_title_cshr'" ',
  1868.             '"INTSTR = ""'global.txt_gad_shears'"", 1, 32000, 'global.shears' ',
  1869.             ' INT10000STR = ""'global.txt_gad_fromsh'"", -450000, 450000, 'global.fromsh' ',
  1870.             ' INT10000STR = ""'global.txt_gad_tosh'"", -450000, 450000, 'global.tosh' "'
  1871.     IF RC = 0 THEN DO
  1872.         global.shears = RESULT.1
  1873.         global.fromsh = RESULT.2
  1874.         global.tosh   = RESULT.3
  1875.     END
  1876.  
  1877.     RETURN
  1878.  
  1879.  
  1880.  
  1881.  
  1882. ResizeSettings: PROCEDURE EXPOSE global.
  1883.  
  1884.     Request '"'global.txt_title_cresz'" ',
  1885.             '"INTSTR = ""'global.txt_gad_resizes'"", 1, 32000, 'global.resizes' ',
  1886.             ' INT10000STR = ""'global.txt_gad_fromrs'"", 00100, 320000000, 'global.fromrs' ',
  1887.             ' INT10000STR = ""'global.txt_gad_tors'"", 00100, 320000000, 'global.tors' "'
  1888.     IF RC = 0 THEN DO
  1889.         global.resizes = RESULT.1
  1890.         global.fromrs  = RESULT.2
  1891.         global.tors    = RESULT.3
  1892.     END
  1893.  
  1894.     RETURN
  1895.  
  1896.  
  1897.  
  1898.  
  1899. BoldSettings: PROCEDURE EXPOSE global.
  1900.  
  1901.     Request '"'global.txt_title_cbold'" ',
  1902.             '"INTSTR = ""'global.txt_gad_bolds'"", 1, 32000, 'global.bolds' ',
  1903.             ' INT10000STR = ""'global.txt_gad_frombdx'"", -80000, 80000, 'global.frombdx' ',
  1904.             ' INT10000STR = ""'global.txt_gad_tobdx'"", -80000, 80000, 'global.tobdx' ',
  1905.             ' INT10000STR = ""'global.txt_gad_frombdy'"", -80000, 80000, 'global.frombdy' ',
  1906.             ' INT10000STR = ""'global.txt_gad_tobdy'"", -80000, 80000, 'global.tobdy' "'
  1907.     IF RC = 0 THEN DO
  1908.         global.bolds   = RESULT.1
  1909.         global.frombdx = RESULT.2
  1910.         global.tobdx   = RESULT.3
  1911.         global.frombdy = RESULT.4
  1912.         global.tobdy   = RESULT.5
  1913.     END
  1914.  
  1915.     RETURN
  1916.  
  1917.  
  1918.  
  1919.  
  1920. DisplayData: PROCEDURE EXPOSE global.
  1921.  
  1922.     direct = global.direct
  1923.     add = global.add
  1924.     rotdir = global.rotdir
  1925.     handle = global.handle
  1926.     antialias = global.aalias
  1927.  
  1928.     str = COMPRESS(global.txt_gad_count, '_') global.count || '0A'x ||,
  1929.           COMPRESS(global.txt_gad_direct, '_') global.txt_gad_dirct.direct || '0A'x ||,
  1930.           COMPRESS(global.txt_gad_add, '_') global.txt_gad_noyes.add || '0A'x ||,
  1931.           '0A'x ||,
  1932.           COMPRESS(global.txt_gad_font, '_') global.font || '0A'x ||,
  1933.           COMPRESS(global.txt_gad_char, '_') global.char || '0A'x ||,
  1934.           COMPRESS(global.txt_gad_size, '_') global.size || '0A'x ||,
  1935.           COMPRESS(global.txt_gad_handle, '_') global.txt_gad_handl.handle || '0A'x ||,
  1936.           COMPRESS(global.txt_gad_aalias, '_') global.txt_gad_aals.antialias || '0A'x ||,
  1937.           '0A'x ||,
  1938.           COMPRESS(global.txt_gad_rotats, '_') global.rotats || '0A'x ||,
  1939.           COMPRESS(global.txt_gad_fromang, '_') (global.fromang / 10000) || '0A'x ||,
  1940.           COMPRESS(global.txt_gad_toang, '_') (global.toang / 10000) || '0A'x ||,
  1941.           COMPRESS(global.txt_gad_rotdir, '_') global.txt_gad_rotdr.rotdir || '0A'x ||,
  1942.           '0A'x ||,
  1943.           COMPRESS(global.txt_gad_shears, '_') global.shears || '0A'x ||,
  1944.           COMPRESS(global.txt_gad_fromsh, '_') (global.fromsh / 10000) || '0A'x ||,
  1945.           COMPRESS(global.txt_gad_tosh, '_') (global.tosh / 10000) || '0A'x ||,
  1946.           '0A'x ||,
  1947.           COMPRESS(global.txt_gad_resizes, '_') global.resizes || '0A'x ||,
  1948.           COMPRESS(global.txt_gad_fromrs, '_') (global.fromrs / 10000) || '0A'x ||,
  1949.           COMPRESS(global.txt_gad_tors, '_') (global.tors / 10000) || '0A'x ||,
  1950.           '0A'x ||,
  1951.           COMPRESS(global.txt_gad_bolds, '_') global.bolds || '0A'x ||,
  1952.           COMPRESS(global.txt_gad_frombdx, '_') global.frombdx || '0A'x ||,
  1953.           COMPRESS(global.txt_gad_tobdx, '_') global.tobdx || '0A'x ||,
  1954.           COMPRESS(global.txt_gad_frombdy, '_') global.frombdy || '0A'x ||,
  1955.           COMPRESS(global.txt_gad_tobdy, '_') global.tobdy || '0A'x
  1956.  
  1957.     pos = 1
  1958.     DO FOREVER
  1959.         pos = INDEX(str, '"', pos)
  1960.         IF pos = 0 THEN
  1961.             BREAK
  1962.         str = INSERT('"', str, pos)
  1963.         pos = pos + 2
  1964.     END
  1965.  
  1966.     IF global.points > 0 THEN DO
  1967.         IF global.points = 2 THEN
  1968.             ptype = 1
  1969.         ELSE
  1970.             ptype = 0
  1971.  
  1972.         str = str ||,
  1973.               '0A'x ||,
  1974.               global.txt_msg_points global.points global.txt_msg_ptype.ptype || '0A'x ||,
  1975.               '0A'x
  1976.  
  1977.         DO point = 0 FOR global.points
  1978.             str = str || global.xcoord.point','global.ycoord.point || '0A'x
  1979.         END
  1980.     END
  1981.     RequestNotify '"'global.txt_title_data'" "'str'" SCROLL'
  1982.  
  1983.     RETURN
  1984.  
  1985.  
  1986.  
  1987.  
  1988. XorPath: PROCEDURE EXPOSE global.
  1989.  
  1990.     IF global.points > 0 THEN DO
  1991.         xp = global.xcoord.0
  1992.         yp = global.ycoord.0
  1993.         last = global.points - 1
  1994.  
  1995.         DO point = 1 TO last
  1996.             IF point = 1 THEN
  1997.                 nfp = ''
  1998.             ELSE
  1999.                 nfp = 'NOFIRSTPIXEL'
  2000.             DrawLine xp yp global.xcoord.point global.ycoord.point 'COMPLEMENT' nfp
  2001.  
  2002.             xp = global.xcoord.point
  2003.             yp = global.ycoord.point
  2004.         END
  2005.     END
  2006.  
  2007.     RETURN
  2008.  
  2009.  
  2010.  
  2011.  
  2012. LoadSet: PROCEDURE
  2013.  
  2014.     sname = ARG(1)
  2015.     def_val = ARG(2)
  2016.     IF ARG() > 2 THEN
  2017.         global_set = ARG(3)
  2018.     ELSE
  2019.         global_set = 0
  2020.     IF ARG() > 3 THEN
  2021.         request_quote = ARG(4)
  2022.     ELSE
  2023.         request_quote = 1
  2024.  
  2025.     val = def_val
  2026.     IF global_set THEN
  2027.         set_fname = 'ENV:'sname
  2028.     ELSE
  2029.         set_fname = 'ENV:PP_AnimChar_'sname
  2030.  
  2031.     IF OPEN('settingfile', set_fname, 'R') THEN DO
  2032.         val = READCH('settingfile', 65535)
  2033.         CALL CLOSE('settingfile')
  2034.     END
  2035.  
  2036.     IF request_quote THEN DO
  2037.         /* encode quotes for the Request command ('"' -> '\""') */
  2038.         qpos_start = 1
  2039.         DO FOREVER
  2040.             qpos = INDEX(val, '"', qpos_start)
  2041.             IF qpos = 0 THEN BREAK
  2042.             val = INSERT('\"', val, qpos-1)
  2043.             qpos_start = qpos + 3
  2044.         END
  2045.     END
  2046.  
  2047.     RETURN val
  2048.  
  2049.  
  2050.  
  2051.  
  2052. Cleanup: PROCEDURE EXPOSE global.
  2053.  
  2054.     IF global.pathdisp THEN DO
  2055.         LockGUI
  2056.         CALL XorPath
  2057.         UnlockGUI
  2058.     END
  2059.  
  2060.     RETURN
  2061.  
  2062.  
  2063.  
  2064.  
  2065. Break_C:
  2066.  
  2067.     SetCurrentBrush 'RECTANGULAR WIDTH 1 HEIGHT 1'
  2068.     SetPen 'FOREGROUND' global.xorpen
  2069.     CALL Cleanup
  2070.  
  2071.     LockGUI
  2072.     SetPen 'FOREGROUND' global.savepen
  2073.     SetCurrentBrush global.savebsh
  2074.     SetPaintMode global.savepmode
  2075.     IF global.savebshfr > 1 THEN
  2076.         SetBrushAttributes 'FRAMEPOSITION' global.savebshfp
  2077.     Set '"BARS='savebars'"'
  2078.     Set '"GCLIP='saveclip'"'
  2079.     Set '"COORD='savecoord'"'
  2080.     EnableTools
  2081.     UnlockGUI
  2082.  
  2083.     RETURN
  2084.